<!--  -->
<template>
    <div class="my-give">
        <Nav title="赠品详情">
            <template v-slot:left>
                <span class="back" @click="$router.back()"></span>
            </template>
        </Nav>
        <div class="divide-line"></div>
        <div class="total">
            共计获得{{count}}次赠品
        </div>
        <div class="order-list-wrapper">
          
             
                    <GiveList :giveList.sync="giveList"></GiveList>
            
         
        </div>
    </div>
</template>

<script>
import Nav from "../../components/Nav";
import { userReward } from "../../api/api";


import GiveList from "../../components/GiveList";

export default {

  components: { GiveList, Nav },
  data() {
    return {
      giveList: [],
      count:0
    };
  },
  computed: {},
  watch: {},
  methods: {
    _api() {
      userReward().then(({ data: { result } }) => {
        this.giveList = result.list
        this.count=result.count
      });
    }
  },
  created() {},
  mounted() {
    this._api()
  },
  updated() {}, //生命周期 - 更新之后
  destroyed() {} //生命周期 - 销毁完成
};
</script>
<style lang='less' scoped>
//@import url(); 引入公共css类
.my-give {
  height: 100%;
  .total{
      text-indent: 23px;
      height: 44px;
      line-height: 44px;
      font-size: 15px;
      color:#FE6C01;
      border-bottom:1px solid #EAEAEA;
  }

 
}
</style>